﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using DevExpress.Xpo;
namespace ChuanPlus
{
    public class RequestingDetails : XPLiteObject
    {
        int fRequestingDetailsID;
        [Key(true)]
        public int RequestingDetailsID
        {
            get { return fRequestingDetailsID; }
            set { SetPropertyValue<int>("RequestingDetailsID", ref fRequestingDetailsID, value); }
        }
        [Association("Requesting-RequestingDetails")]
        Requesting fRequestingID;
        [Size(12)]
        public Requesting RequestingID
        {
            get { return fRequestingID; }
            set { SetPropertyValue<Requesting>("RequestingID", ref fRequestingID, value); }
        }
        Stock fStockID;
        public Stock StockID
        {
            get { return fStockID; }
            set { SetPropertyValue<Stock>("StockID", ref fStockID, value); }
        }
        double fQuantity;
        public double Quantity
        {
            get { return fQuantity; }
            set { SetPropertyValue<double>("Quantity", ref fQuantity, value); }
        }
        string fUnit;
        [Size(10)]
        public string Unit
        {
            get { return fUnit; }
            set { SetPropertyValue<string>("Unit", ref fUnit, value); }
        }
        Users fTakenBy;
        public Users TakenBy
        {
            get { return fTakenBy; }
            set { SetPropertyValue<Users>("TakenBy", ref fTakenBy, value); }
        }
        string fNote;
        public string Note
        {
            get { return fNote; }
            set { SetPropertyValue<string>("Note", ref fNote, value); }
        }
        public RequestingDetails(Session session) : base(session) { }
        public RequestingDetails() : base(Session.DefaultSession) { }
        /// <summary>
        /// Initializes a new instance of the RequestingDetails class.
        /// </summary>
        /// <param name="fRequestingID"></param>
        /// <param name="fStockID"></param>
        /// <param name="fQuantity"></param>
        /// <param name="fUnit"></param>
        /// <param name="fTakenBy"></param>
        /// <param name="fNote"></param>
        public RequestingDetails(Requesting fRequestingID, Stock fStockID, double fQuantity, string fUnit, Users fTakenBy, string fNote)
        {
            this.fRequestingID = fRequestingID;
            this.fStockID = fStockID;
            this.fQuantity = fQuantity;
            this.fUnit = fUnit;
            this.fTakenBy = fTakenBy;
            this.fNote = fNote;
        }
        public override void AfterConstruction() { base.AfterConstruction(); }
    }
}
